<template>
  <div>
    测试
    <button @click="getData">测试请求</button>
  </div>
</template>

<script>
// import axios from 'axios'
// import request from '@/utils/request'

import { reqSwiperList, reqFloorList } from '@/api/index'
export default {
  name: 'VText',
  methods: {
    // eslint-disable-next-line prefer-const
    // .then((res) => { console.log(res)  })
    // async getData() {
    //   const { data } = await request.get('/api/product/getBaseCategoryList')
    //   console.log(data)
    // }
    // getData() {
    //   request.get('/api/product/getBaseCategoryList').then((res) => {
    //     console.log(res)
    //   })
    // }
    async getData() {
      // 轮播图数据
      const swiper = await reqSwiperList()
      console.log(swiper)

      // 楼层数据
      const floor = await reqFloorList()
      console.log(floor)
    }
  }
}
</script>

<style lang="less" scoped></style>
